package com.powernode.work.dao;

import com.powernode.work.bean.ClueBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClueMapper {
    int deleteByPrimaryKey(String id);

    int insert(ClueBean record);

    int insertSelective(ClueBean record);

    ClueBean selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(ClueBean record);

    int updateByPrimaryKey(ClueBean record);

    List<ClueBean> selectAll(ClueBean clue);

    int delBatch(String [] ids);

    /**
     * 删除线索的之前关联的市场活动
     * @param clueId
     * @return
     */
    int deleteActivityByClueId(String clueId);

    /**
     * 重新添加线索关联的市场活动
     *
     * @param clueId
     * @param activityIds
     * @return
     */
    int insertActivityClue(@Param("clueId") String clueId,
                           @Param("activityIds") String [] activityIds);
}